<%@ page import="java.util.List" %>
<%@ page import="java.util.Arrays" %>
<%@ page import="java.util.stream.Collectors" %>
<%@ page import="com.stu.model.Task" %>
<%@ page import="static java.awt.AWTEventMulticaster.add" %><%--
  Created by IntelliJ IDEA.
  User: aaa
  Date: 2024/6/24
  Time: 15:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>我的任务</title>
</head>
<style>
  #content{
    border: black solid 5px;
    width: 1100px;
    height: 800px;
    margin-top: -280px;
    margin-left: 230px;
    color: grey;
    font-size: 50px;
  }

</style>
<body>
<div id="content">
  <table border="1" cellspacing="0" align="center" class="con-b" width="100%">
      <thead>
      <tr class="row" style="color: black;font-size: 25px" >
        <td class="lf">任务账户</td>
        <td class="lf">任务时间</td>
        <td class="lf">任务名称</td>
          <td class="lf" colspan="2">操作</td>
      </tr>
      </thead>
      <tbody>
      <c:forEach items="${taskList}" var="task">
        <tr class="row" style="color: black;font-size: 25px" >
          <td class="lf">${task.taskAccount}</td>
          <td class="lf">${task.taskDate}</td>
          <td class="lf">${task.taskName}</td>
            <td class="lf"><input type="button" value="删除题目" onclick="deleteThisTask('${task.taskAccount}')"></td>
          <td class="lf"><input type="button" value="查看详情" onclick="skimDetail('${task.taskAccount}')"></td>
        </tr>
      </c:forEach>
    </tbody>
    <tr></tr>
  </table>
</div>
</body>
<script>
    function deleteThisTask(taskAccount){
        //跳转执行该任务的新页面
        window.location.href="TeacherServlet?action=deleteThisTask&taskAccount="+taskAccount;

    }
  function skimDetail(taskAccount){
    //查看这个任务的学生完成情况
    window.location.href="TeacherServlet?action=goSkimDetail&taskAccount="+taskAccount;

  }
</script>
</html>


